﻿package com.wandian.model
{
	import com.wandian.controller.CLZNoticeName;
	import com.wandian.data.GameData;
	import com.wandian.model.http.BankData;
	import com.wandian.model.http.UserData;
	import com.wandian.model.vo.*;
	
	import org.puremvc.as3.patterns.proxy.*;
	import org.puremvc.as3.patterns.proxy.Proxy;

    public class BankProxy extends Proxy
    {
        public static const NAME:String = "BankProxy";

        public function BankProxy(param1:Object = null)
        {
            super(NAME, param1);
            return;
        }

        public function requestOpenBank(param1:Object) : void
        {
            var _loc_2:* = new BankData();
            _loc_2.requestOpenBank(param1, this.responseOpenBank);
            return;
        }

        public function responseOpenBank(param1:Object) : void
        {
            if (param1.svflag == 1)
            {
                this.sendNotification(CLZNoticeName.BANK_COMMIT_OPEN_RES);
                this.sendNotification(CLZNoticeName.SHOW_MOVE_TIP, {tip:GameData.tip["OPEN_BANK_SUCC"]});
            }
            else
            {
                this.sendNotification(CLZNoticeName.SHOW_MOVE_TIP, {tip:GameData.tip["OPEN_BANK_ERR"]});
            }
            return;
        }

        public function requestRecord(param1:int) : void
        {
            var _loc_2:* = new BankData();
            _loc_2.requestGetBankRecord(param1, this.responseRecord);
            return;
        }

        public function responseRecord(param1:Object) : void
        {
            this.sendNotification(CLZNoticeName.BANK_COMMIT_RECORD_RES, param1.data);
            return;
        }

    }
}
